<div class="panel panel-default">
  <!-- Default panel contents -->
  <div class="panel-heading">专项城市基金-项目活动
    <?php if (in_array($action, array('edit'))) {?>
    <a class="btn btn-default col-md-offset-9" role="button" href="<?php echo printUrl('SpecityProject','add', array('procId'=>$procData['id'],'isBubao'=>$isBubao)); ?>">新增</a>
    <?php } ?>
  </div>
  <table class="table">
    <thead>
      <tr>
        <th class="bg-primary text-center">项目编号</th>
        <th class="bg-primary text-center">项目名称</th>
        <th class="bg-primary text-center">标准动作</th>
        <?php /*?>
        <th class="bg-primary text-center">基金类型</th>
        <?php */?>
        <th class="bg-primary text-center">活动类型</th>
        <th class="bg-primary text-center">预算总费用</th>
        <th class="bg-primary text-center">明细</th>
        <th class="bg-primary text-center">预算审核情况</th>
        <th class="bg-primary text-center">预算审核金额</th>
        <?php if ( in_array($action, array('edit')) ) {?>
        <th class="bg-primary text-center">操作</th>
        <?php } ?>
        <?php if ( in_array($action, array('audit')) ) {?>
        <th class="bg-primary text-center">项目一键审核</th>
        <?php } ?>
      </tr>
    </thead>
    <tbody>
    <?php foreach($projectList as $k => $v): ?>
      <tr>
        <td class="text-center"><?php echo $v['id']; ?></td>
        <td class="text-center"><?php echo $v['projectName']; ?></td>
        <td class="text-center"><?php echo $v['actionTypeStr'] ?></td>
        <?php /*?>
        <td class="text-center"><?php echo $v['fundTypeStr'] ?></td>
        <?php */?>
        <td class="text-center"><?php echo $v['eventTypeStr'].'-'.$v['eventClassStr'] ?></td>
        <td class="text-center"><?php echo $v['budgetApply'] ?></td>
        <td class="text-center">
          <?php if (in_array($action, array('edit','check'))) {?>
          <a type="button" onclick="newWindow('查看项目', '<?=printUrl('SpecityProject','budgetCheck', array('procId'=>$v['procId'],'projectId'=>$v['id']))?>', 900, 600)" class="btn btn-default">查看</a>
          <?php } ?>
          <?php if ($v['settleAuditRs'] == -1 && in_array($action, array('audit'))) {?>
          <a type="button" onclick="newWindow('预算审核', '<?=printUrl('SpecityProject','budgetAudit', array('procId'=>$v['procId'],'projectId'=>$v['id']))?>', 1000, 600)" class="btn btn-default">预算审核</a>
          <?php } ?>
        </td>
        <td class="text-center"><?php echo $v['budgetAuditStr'] ?></td>
        <td class="text-center"><?php echo $v['budgetAudit'] ?></td>
        <?php if (in_array($action, array('edit'))) {?>
        <td class="text-center">
          <?php if (in_array($v['budgetAuditRs'], array(-1,0,3))) {?>
          <a class="btn btn-default" href="<?=printUrl('SpecityProject','edit', array('projectId'=>$v['id']))?>" role="button">修改</a>
          <a class="btn btn-default" type="button" onclick="ajaxConfirmSubmit('您确定要删除此项目吗？<br>此操作不可撤销','<?=printUrl('SpecityProject','del')?>',{'projectId':<?=$v['id']?>})">删除</a>
          <?php } ?>
        </td>
        <?php } ?>
        <?php if (in_array($action, array('audit'))) {?>
        <td class="text-center">
          <?php
          $options = $this->config->item('budgetAuditOptions');
          $extra = ' class="form-control budgetAuditRs"  style="width:70px;" money="'.((float)$v['budgetAudit'] ? $v['budgetAudit'] : $v['budgetApply']).'" ';
          if ($v['settleAuditRs'] > -1 || $v['budgetAuditDetail'] == 1 || $this->user['userRole'] < $v['budgetAuditRole']) {
            $extra .= " disabled";
          }
          echo form_dropdown('project['.$v['id'].'][budgetAuditRs]', $options, $v['budgetAuditRs'], $extra);
          ?>
        </td>
        <?php } ?>
      </tr>
    <?php endforeach; ?>
    </tbody>
  </table>
</div>